package com.beemans.common.app.ui.fragments

import com.beemans.common.app.R
import com.beemans.common.app.databinding.FragmentSearchBinding
import com.beemans.common.app.sharedViewModel
import com.beemans.common.app.ui.base.BaseFragment
import com.tiamosu.databinding.delegate.lazyDataBindingOrNull
import com.tiamosu.databinding.page.DataBindingConfig
import com.tiamosu.fly.ext.clickNoRepeat

/**
 * @author tiamosu
 * @date 2021/4/26.
 */
class SearchFragment : BaseFragment() {
    private val dataBinding: FragmentSearchBinding? by lazyDataBindingOrNull { }

    override fun getDataBindingConfig(): DataBindingConfig {
        return DataBindingConfig(R.layout.fragment_search)
    }

    override fun initEvent() {
        dataBinding?.searchBtnChange?.clickNoRepeat {
            sharedViewModel.changeMainTab.value = HomeFragment::class.java
        }
    }

    override fun doBusiness() {
    }
}